/*
 * @Description  :
 * @Version      : 1.0
 * @Author       : Shiming
 * @Date         : 2021-12-06 20:20:26
 * @LastEditors  : Shiming
 * @LastEditTime : 2022-05-18 17:25:49
 * @FilePath     : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail\\bill-code-detail.component.ts
 * Copyright (C) 2022 huzhenhong. All rights reserved.
 */
import { Router } from '@angular/router';
import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { STColumn, STComponent } from '@delon/abc/st';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalService } from 'ng-zorro-antd/modal';
import {InterfaceDockingService} from "../../services/interface-docking.service";

@Component({
  selector: 'app-supply-management-bulk-detail',
  templateUrl: './bill-code-detail.component.html',
  styleUrls: ['./bill-code-detail.component.less']
})
export class billCodeDetailComponent implements OnInit {
  MapList: any[] = [];
  @ViewChild('logSt') logSt!: STComponent;
  id = this.route.snapshot.params.id;
  billExpenses: any[] = []; //运费信息表格信息
  pois: any[] = [];
  i: any;
  modalcontent: any;
  modalTitle: string = '';
  isVisible = false;
  billCodeDetail : any = {};
  trajectory = 'car';
  mapList: any[] = []; //地图点位数据组
  addressItems: any[] = []; //打点地址数据组
  constructor(
    public route: ActivatedRoute,
    public service: InterfaceDockingService,
  ) {}
  pickUpGoodInfo: STColumn[] = [
    { title: '类型', render: 'fromTo'},
    { title: '地址', index: 'address' },
    { title: '单位', index: 'customerName' },
    { title: '省', index: 'def5' },
    { title: '市', index: 'def6' },
    { title: '区', index: 'def7' },
    { title: '联系人', index: 'contact' },
    { title: '联系电话', index: 'tell' },
    { title: '多点提送顺序', index: 'pickSeq' },
  ];

  goodsPackInfo: STColumn[] = [
    { title: '托数', index: 'qty' },
    { title: '单位', index: 'uom' },
    { title: '长', index: 'length' },
    { title: '高', index: 'high' },
    { title: '宽', index: 'width' },
    { title: '货物名称', index: 'skuC' },
    { title: '货物大类', index: 'commodity' },
  ];


  ngOnInit(): void {
      this.getBillCodeDetail();
  }

  /**
   * 运单详细信息
   */
  getBillCodeDetail() {
    this.service.request(this.service.$api_detailsByBillCode, this.route.snapshot.queryParams).subscribe((res: any) => {
      this.billCodeDetail = res;
    })
  }

  goBack() {
    window.history.go(-1);
  }






}
